package com.jeady.timetodo.activities.light

import android.content.Context
import android.hardware.camera2.CameraManager

object LightController {
    fun open(context: Context){
        val manager = context.getSystemService(Context.CAMERA_SERVICE) as CameraManager
        manager.setTorchMode("0", true)
    }
    fun close(context: Context){
        val manager = context.getSystemService(Context.CAMERA_SERVICE) as CameraManager
        manager.setTorchMode("0", false)
    }
}